package com.cow.sram.data.dao;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.cow.sram.data.entity.Resourceinfo;


public interface TreeDefDAO extends JpaRepository<Resourceinfo, Serializable>{
	List<Resourceinfo> findByResourcetypeOrderByOrderNo(String resourcetype);
	@Query("select t from Resourceinfo t where isTree = 1 and resourcetype = ?1 order by fatherId,orderNo")
	List<Resourceinfo> getTreeDefByType(String resourcetype);
}
